Embodiments of the inventive subject matter generally relate to the field of processor design, and, more particularly, to dynamic conversion of instructions to predicated instructions in response to a branch prediction confidence level.
Increases in processor speed alone are not sufficient to keep up with the demand for higher performance computers. Processor designers look for further optimizations to increase the efficiency of a processor. For example, processor designers may design processors with multiple cores, more memory or longer pipelines. One particular source of processor inefficiency is the conditional branch. Simple processors do not know whether a branch will be taken until the branch instruction is executed, thus do not know which set of instructions to fetch and put into the pipeline following the branch instruction. Because it takes multiple processor cycles to execute an instruction, certain components of the processor sit idle until the branch instruction is executed.
Branch prediction and instruction predication are two techniques that help reduce these inefficiencies. Branch prediction allows the processor to guess which branch will be taken based on a history of that particular branch. Branch predication allows all related instructions to be put into the pipeline, and only executing or using the result of the instructions that correspond to the result of the branch instruction execution. But both of these techniques have their limitations, with each being more efficient than the other in certain scenarios.